/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package net.yienyien.process.pim.impl;

import net.yienyien.process.pim.PimPackage;
import net.yienyien.process.pim.ProcessInformation;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.wst.wsdl.Operation;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Process Information</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link net.yienyien.process.pim.impl.ProcessInformationImpl#getName <em>Name</em>}</li>
 *   <li>{@link net.yienyien.process.pim.impl.ProcessInformationImpl#getTagetNamespace <em>Taget Namespace</em>}</li>
 *   <li>{@link net.yienyien.process.pim.impl.ProcessInformationImpl#getExpressionLanguage <em>Expression Language</em>}</li>
 *   <li>{@link net.yienyien.process.pim.impl.ProcessInformationImpl#getQueryLanguage <em>Query Language</em>}</li>
 *   <li>{@link net.yienyien.process.pim.impl.ProcessInformationImpl#isExitOnStandardFault <em>Exit On Standard Fault</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class ProcessInformationImpl extends EObjectImpl implements ProcessInformation {
	/**
	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getName()
	 * @generated
	 * @ordered
	 */
	protected static final String NAME_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getName()
	 * @generated
	 * @ordered
	 */
	protected String name = NAME_EDEFAULT;

	/**
	 * The default value of the '{@link #getTagetNamespace() <em>Taget Namespace</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTagetNamespace()
	 * @generated
	 * @ordered
	 */
	protected static final String TAGET_NAMESPACE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getTagetNamespace() <em>Taget Namespace</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTagetNamespace()
	 * @generated
	 * @ordered
	 */
	protected String tagetNamespace = TAGET_NAMESPACE_EDEFAULT;

	/**
	 * The default value of the '{@link #getExpressionLanguage() <em>Expression Language</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExpressionLanguage()
	 * @generated
	 * @ordered
	 */
	protected static final String EXPRESSION_LANGUAGE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getExpressionLanguage() <em>Expression Language</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExpressionLanguage()
	 * @generated
	 * @ordered
	 */
	protected String expressionLanguage = EXPRESSION_LANGUAGE_EDEFAULT;

	/**
	 * The default value of the '{@link #getQueryLanguage() <em>Query Language</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getQueryLanguage()
	 * @generated
	 * @ordered
	 */
	protected static final String QUERY_LANGUAGE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getQueryLanguage() <em>Query Language</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getQueryLanguage()
	 * @generated
	 * @ordered
	 */
	protected String queryLanguage = QUERY_LANGUAGE_EDEFAULT;

	/**
	 * The default value of the '{@link #isExitOnStandardFault() <em>Exit On Standard Fault</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #isExitOnStandardFault()
	 * @generated
	 * @ordered
	 */
	protected static final boolean EXIT_ON_STANDARD_FAULT_EDEFAULT = false;

	/**
	 * The cached value of the '{@link #isExitOnStandardFault() <em>Exit On Standard Fault</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #isExitOnStandardFault()
	 * @generated
	 * @ordered
	 */
	protected boolean exitOnStandardFault = EXIT_ON_STANDARD_FAULT_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected ProcessInformationImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return PimPackage.Literals.PROCESS_INFORMATION;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
		return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setName(String newName) {
		String oldName = name;
		name = newName;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, PimPackage.PROCESS_INFORMATION__NAME, oldName, name));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getTagetNamespace() {
		return tagetNamespace;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setTagetNamespace(String newTagetNamespace) {
		String oldTagetNamespace = tagetNamespace;
		tagetNamespace = newTagetNamespace;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, PimPackage.PROCESS_INFORMATION__TAGET_NAMESPACE, oldTagetNamespace, tagetNamespace));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getExpressionLanguage() {
		return expressionLanguage;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setExpressionLanguage(String newExpressionLanguage) {
		String oldExpressionLanguage = expressionLanguage;
		expressionLanguage = newExpressionLanguage;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, PimPackage.PROCESS_INFORMATION__EXPRESSION_LANGUAGE, oldExpressionLanguage, expressionLanguage));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getQueryLanguage() {
		return queryLanguage;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setQueryLanguage(String newQueryLanguage) {
		String oldQueryLanguage = queryLanguage;
		queryLanguage = newQueryLanguage;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, PimPackage.PROCESS_INFORMATION__QUERY_LANGUAGE, oldQueryLanguage, queryLanguage));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isExitOnStandardFault() {
		return exitOnStandardFault;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setExitOnStandardFault(boolean newExitOnStandardFault) {
		boolean oldExitOnStandardFault = exitOnStandardFault;
		exitOnStandardFault = newExitOnStandardFault;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, PimPackage.PROCESS_INFORMATION__EXIT_ON_STANDARD_FAULT, oldExitOnStandardFault, exitOnStandardFault));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case PimPackage.PROCESS_INFORMATION__NAME:
				return getName();
			case PimPackage.PROCESS_INFORMATION__TAGET_NAMESPACE:
				return getTagetNamespace();
			case PimPackage.PROCESS_INFORMATION__EXPRESSION_LANGUAGE:
				return getExpressionLanguage();
			case PimPackage.PROCESS_INFORMATION__QUERY_LANGUAGE:
				return getQueryLanguage();
			case PimPackage.PROCESS_INFORMATION__EXIT_ON_STANDARD_FAULT:
				return isExitOnStandardFault() ? Boolean.TRUE : Boolean.FALSE;
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case PimPackage.PROCESS_INFORMATION__NAME:
				setName((String)newValue);
				return;
			case PimPackage.PROCESS_INFORMATION__TAGET_NAMESPACE:
				setTagetNamespace((String)newValue);
				return;
			case PimPackage.PROCESS_INFORMATION__EXPRESSION_LANGUAGE:
				setExpressionLanguage((String)newValue);
				return;
			case PimPackage.PROCESS_INFORMATION__QUERY_LANGUAGE:
				setQueryLanguage((String)newValue);
				return;
			case PimPackage.PROCESS_INFORMATION__EXIT_ON_STANDARD_FAULT:
				setExitOnStandardFault(((Boolean)newValue).booleanValue());
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case PimPackage.PROCESS_INFORMATION__NAME:
				setName(NAME_EDEFAULT);
				return;
			case PimPackage.PROCESS_INFORMATION__TAGET_NAMESPACE:
				setTagetNamespace(TAGET_NAMESPACE_EDEFAULT);
				return;
			case PimPackage.PROCESS_INFORMATION__EXPRESSION_LANGUAGE:
				setExpressionLanguage(EXPRESSION_LANGUAGE_EDEFAULT);
				return;
			case PimPackage.PROCESS_INFORMATION__QUERY_LANGUAGE:
				setQueryLanguage(QUERY_LANGUAGE_EDEFAULT);
				return;
			case PimPackage.PROCESS_INFORMATION__EXIT_ON_STANDARD_FAULT:
				setExitOnStandardFault(EXIT_ON_STANDARD_FAULT_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case PimPackage.PROCESS_INFORMATION__NAME:
				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
			case PimPackage.PROCESS_INFORMATION__TAGET_NAMESPACE:
				return TAGET_NAMESPACE_EDEFAULT == null ? tagetNamespace != null : !TAGET_NAMESPACE_EDEFAULT.equals(tagetNamespace);
			case PimPackage.PROCESS_INFORMATION__EXPRESSION_LANGUAGE:
				return EXPRESSION_LANGUAGE_EDEFAULT == null ? expressionLanguage != null : !EXPRESSION_LANGUAGE_EDEFAULT.equals(expressionLanguage);
			case PimPackage.PROCESS_INFORMATION__QUERY_LANGUAGE:
				return QUERY_LANGUAGE_EDEFAULT == null ? queryLanguage != null : !QUERY_LANGUAGE_EDEFAULT.equals(queryLanguage);
			case PimPackage.PROCESS_INFORMATION__EXIT_ON_STANDARD_FAULT:
				return exitOnStandardFault != EXIT_ON_STANDARD_FAULT_EDEFAULT;
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (name: ");
		result.append(name);
		result.append(", tagetNamespace: ");
		result.append(tagetNamespace);
		result.append(", expressionLanguage: ");
		result.append(expressionLanguage);
		result.append(", queryLanguage: ");
		result.append(queryLanguage);
		result.append(", exitOnStandardFault: ");
		result.append(exitOnStandardFault);
		result.append(')');
		return result.toString();
	}

} //ProcessInformationImpl
